import http from '@/utils/Httprequest';

export let uploadApi = (data: any) => {
	return http({
		url: '/upload',
		headers: {
			'Content-Type': 'multipart/form-data',
		},
		data,
	});
};

export let getlocalIpApi = () => {
	return http({
		url: '/localIp',
		method: 'GET',
	});
};

export let saveWorksApi = (data: any) => {
	return http({
		url: '/works',
		data,
	});
};

export let getworksChannelsApi = () => {
	return http({
		url: '/worksChannels',
		method: 'GET',
	});
};

export let worksChannelApi = (data: any) => {
	return http({
		url: '/worksChannel',
		data,
	});
};

export let deleteWorksChannelApi = (id: string) => {
	return http({
		url: '/worksChannel/' + id,
		method: 'DELETE',
	});
};
